import { openBuildService } from '../../helper/service'

// 值类型为String或Object,String为url(method),Object同axios(config)参数支持相同,data和params只能为对象类型
const settings = {
    // 获取权限列表
    getPermissionList: {
        url: '/adminc/v1/resource_manage/p_object/get_object_list',
        method: 'get'
    },
    // 添加子权限项
    createPermission: {
        url: '/adminc/v1/resource_manage/p_object/create_object',
        method: 'post'
    },
    // 修改权限项
    updatePermission: {
        url: '/adminc/v1/resource_manage/p_object/update_object',
        method: 'put'
    },
    // 删除权限项
    deletePermission: {
        url: '/adminc/v1/resource_manage/p_object/delete_object',
        method: 'delete'
    },
    // 获取权限选择树数据
    getPermissionTreeData: {
        url: '/adminc/v1/resource_manage/p_object/get_object_cate_list',
        method: 'get'
    },
    // 新增权限选择树分类
    addPermissionTreeClass: {
        url: '/adminc/v1/resource_manage/p_object/create_object_cate',
        method: 'post'
    },
    // 修改权限选择树分类
    editPermissionTreeClass: {
        url: '/adminc/v1/resource_manage/p_object/update_object_cate',
        method: 'put'
    },
    // 删除权限选择树分类
    deletePermissionTreeClass: {
        url: '/adminc/v1/resource_manage/p_object/delete_object_cate',
        method: 'delete'
    },
    //移动
    moveTree: {
        url: '/adminc/v2/p_object_v2/move_object',
        method: 'post'
    },
    //确定同步
    saveSync: {
        url: '/adminc/v2/p_object_v2/sync_object',
        method: 'post'
    },
    //进入页面加载所有
    getAllList: {
        url: '/adminc/v1/resource_manage/p_object/get_object_all_list',
        method: 'get'
    },
}

export default openBuildService(settings)